<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{.note.Title}}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
{{template "comm/link.html"}}
 {{if eq .note.Editor "markdown"}}
        <link rel="stylesheet" href="/static/lib/editormd/css/editormd.min.css">
 {{end}}
</head>

<body class="lay-blog">
{{if .note.User.Avatar}}
<image style="display: none;" src="{{.note.User.Avatar}}"></image>
        {{else}}
<image style="display: none;" src="/static/images/info-img.png"></image>
 {{end}}
{{template "comm/header.html".}}
<div class="container-wrap">
    <div class="container container-message container-details">
        <div class="contar-wrap">
            <div class="item">
                <div class="item-box  layer-photos-demo1 layer-photos-demo">
                    <h3><a href="#">{{.note.Title}}</a></h3>
                    <h5>发布于：<span>{{date .note.UpdatedAt "Y-m-d H:i:s"}}</span></h5>
                    <div class="body {{if eq .note.Editor "markdown"}} markdown-body editormd-preview-container {{end}}" style="overflow-y: auto">
                    {{str2html .note.Content}}
                    </div>
                {{/*<img src="../res/static/images/item.png" alt="">*/}}
                    <div class="count layui-clear">
                        <span class="pull-left">阅读 <em>{{.note.Visit}}</em></span>
                        <span class="pull-right like {{if .praise}}layblog-this{{end}}" data-type="note"
                              data-key="{{.note.Key}}">
                            <i class="layui-icon layui-icon-praise"></i>
                            <em class="value">{{.note.Praise}}</em>
                        </span>
                    </div>
                </div>
            </div>
        {{if .note.Files}}
            <div class="item">
                <div class="item-box  layer-photos-demo1 layer-photos-demo">
                    <h3>附件下载</h3>
                    <div id="files" style="display: none">{{.note.Files}}</div>
                    <div class="layui-upload-list">
                        <table class="layui-table " lay-skin="line">
                            <thead>
                            <tr>
                                <th>文件名</th>
                            </tr>
                            </thead>
                            <tbody id="demoList"></tbody>
                        </table>
                    </div>
                </div>
            </div>
        {{end}}

            <a name="comment"> </a>
            <div class="comt layui-clear">
                <a href="javascript:;" class="pull-left">评论</a>
                <a href="/comment/{{.note.Key}}" class="pull-right">写评论</a>
            </div>
            <div id="LAY-msg-box">
            {{range .messages}}
                {{template "comm/tpl_msg.html" .}}
                {{end}}
            </div>
        </div>
    </div>
</div>
{{template "comm/footer.html".}}
<script>var note = {userid:{{.note.UserID}},key:{{.note.Key}}};</script>
<script src="/static/js/detail.js"></script>
</body>
</html>